home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 19
/
CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso
/
CUCD
/
Programming
/
LEDA
/
prog
/
graph
/
bicomp.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-05
|
520b
|
36 lines
#include <LEDA/graph.h>
#include <LEDA/ugraph.h>
#include <LEDA/graph_alg.h>
main()
{
UGRAPH<int,int> G;
test_ugraph(G);
edge_array<int> compnum(G);
float T = used_time();
cout << "BI_COMPONENTS ";
cout.flush();
int n = BICONNECTED_COMPONENTS(G,compnum);
cout << string(" %6.2f sec \n",used_time(T));
newline;
cout << n << " components\n";
newline;
if (Yes("ausgabe?"))
{ edge e;
forall_edges(e,G)
{ G.print_edge(e);
cout << string(" c = %3d \n", compnum[e]);
}
}
newline;
return 0;
}